set LnextLoc to the locV of sprite getPropAt(iHopTxtList, 2)
set LmyCstnum to getAt(iHopTxtList, 1)
set LmyHeight to getaProp(iHopCastHghtList, LmyCstnum)
set the locV of sprite getPropAt(iHopTxtList, 1) to LnextLoc - LmyHeight
set iScrollBackFlag to 0
end if
end
on mGetMyBottLoc me, thecstnum
set Lthespr to getPropAt(iHopTxtList, getPos(iHopTxtList, thecstnum))
return the locV of sprite Lthespr + getProp(iHopCastHghtList, thecstnum)
end
on mIsOffScreenUp me, pIndx
set Lthespr to getPropAt(iHopTxtList, pIndx)
if mGetMyBottLoc(me, getAt(iHopTxtList, pIndx)) < iDescFldStartK then
return 1
else
return 0
end if
end
on mScanBottoms me
set Lme to 0
repeat with k = 1 to 4
if mIsPastBottLimit(me, k) then
set Lme to k
exit repeat
end if
end repeat
return Lme
end
on mChroPicDispTest me, pReset
if pReset then
set iTheCenterSpr to 5
set iPrevCenter to iTheCenterSpr
set x to 1
else
repeat with i = 1 to 4
set Lspr to getPropAt(iHopTxtList, i)
if the locV of sprite Lspr < iDescTxtAreaMidK then
if the locV of sprite Lspr > iDescFldTestK then
set iTheCenterSpr to Lspr
exit repeat
next repeat
end if
set Lbottloc to mGetMyBottLoc(me, getAt(iHopTxtList, i))
if Lbottloc > iDescTxtAreaMidK then
set iTheCenterSpr to Lspr
exit repeat
end if
end if
end repeat
if iTheCenterSpr <> iPrevCenter then
set iPrevCenter to iTheCenterSpr
set x to 1
else
set x to 0
end if
end if
if x then
set Lcst to getaProp(iHopTxtList, iTheCenterSpr)
set Lnum to getaProp(iHopItemsList, Lcst)
mQueuePicons(me, Lnum)
mUpdateWinToCHROEntry(oIndexScroller, Lnum, 0)
end if
end
on mIsPastBottLimit me, pIndx
if mGetMyBottLoc(me, getAt(iHopTxtList, pIndx)) < iPiconMaskTopK then
return 1
else
return 0
end if
end
on mIsBelowTopLimit me, pIndx
if the locV of sprite getPropAt(iHopTxtList, pIndx) > (iDescFldStartK + gScrollIncrK) then
return 1
else
return 0
end if
end
on mInitScrPupps me
repeat with i = 1 to 4
puppetSprite(getPropAt(iHopTxtList, i), 1)
end repeat
end
on mHomeTxtScroll me
mPrepHopscotch(me)
set gdescfield to getAt(iHopTxtList, 1)
set the castNum of sprite getPropAt(iHopTxtList, 1) to gdescfield
set gscrtxtspr1 to getPropAt(iHopTxtList, 1)
updateStage()
end
on mHomeScrollFields me
if (gModeState = #ENCY) or (gModeState = #EPIS) or (gModeState = #FoundSet) or (gModeState = #EPISSUB) or (gTopicIsText and (gModeState = #TOPICS)) then
puppetSprite(gscrtxtspr1, 1)
set the locV of sprite gscrtxtspr1 to iDescFldStartK
updateStage()
mSetSlider(oTextSlider, the locV of sprite gscrtxtspr1 - iDescFldStartK, 0)
else
if gModeState = #CHRO then
end if
end if
end
on mNeedTheScrollBars me, pHt
if gModeState = #CHRO then
return 1
end if
if pHt > iDescTextAreaHtK then
return 1
else
return 0
end if
end
on mScrollAtLimit me, pDir, ptheLoc, pMyHeight, pTweak
if pDir < 0 then
if ptheLoc > iDescFldStartK then
set the locV of sprite gscrtxtspr1 to iDescFldStartK
return 1
else
return 0
end if
else
set LbotLoc to ptheLoc + pMyHeight
if LbotLoc < (iDescFldStartK + pTweak) then
return 1
else
return 0
end if
end if
end
on mPrepScrollStats me
set L1 to gTxtScrSprsBeg
set Ln to gTxtScrSprsBeg + 3
set iMyHeight to the height of cast gdescfield + 20
if mNeedTheScrollBars(me, iMyHeight) then
repeat with n = L1 to Ln
set the visible of sprite n to 1
end repeat
set vNewHeight to (iMyHeight - 214) / gScrollIncrK
if (vNewHeight > 0) and not (gModeState = #CHRO) then
mReDefineSlider(oTextSlider, 0, vNewHeight, 0)
end if
else
repeat with n = L1 to Ln
set the visible of sprite n to 0
end repeat
end if
end
on mScrollMe me, pDir
mScrollHoppers(me, pDir)
repeat while the mouseDown
mScrollHoppers(me, pDir)
end repeat
mChroPicDispTest(me)
end
on mScrollBarTextScroll me, pScrollUpDist
if (gModeState <> #CHRO) or gImInHelp then
set the locV of sprite gscrtxtspr1 to iDescFldStartK - (pScrollUpDist * gScrollIncrK)
if pScrollUpDist > 0 then
set gStyleCountThreshold to gStyleCountThreshold + (20 * pScrollUpDist)
hSetStylingNeed(1)
end if
end if
end
on mTextSliderPage me, pStyle
if pStyle = #page then
set vshift to 13
else
set vshift to 1
end if
mSliderBarPage(oTextSlider, vshift)
end
on mPrepHopscotch me
mResetHoppers(me)
set the locV of sprite getPropAt(iHopTxtList, 1) to iDescFldStartK
updateStage()
repeat with i = 2 to 4
set the locV of sprite getPropAt(iHopTxtList, i) to mGetMyBottLoc(me, getAt(iHopTxtList, i - 1)) + iScrollSpacerK
updateStage()
end repeat
end
on mQueuePicons me, pNum
if voidp(getLast(gPiconGarage)) then
return
end if
set Lwhere to findPos(gPiconGarage, pNum)
if voidp(Lwhere) then
return
end if
set gPiconcastloc to getAt(gPiconGarage, Lwhere)
set gNumofpicons to count(gPiconcastloc)
deleteAt(gPiconGarage, Lwhere)
hPurgeMediaCHRO()
if gNumofpicons > 0 then
hDisplayPicons()
end if
end
on mScrollHoppers me, pDir
set iLastScrollDir to pDir
set LmyFirstSpr to getPropAt(iHopTxtList, 1)
set the locV of sprite LmyFirstSpr to the locV of sprite LmyFirstSpr - (pDir * gScrollIncrK)
repeat with i = 2 to 4
set LmySpr to getPropAt(iHopTxtList, i)
set LmyCast to getAt(iHopTxtList, i - 1)
set the locV of sprite LmySpr to mGetMyBottLoc(me, LmyCast) + iScrollSpacerK
end repeat
updateStage()
set gCHROisScrolling to 1
if pDir > 0 then
if mGetMyBottLoc(me, getAt(iHopTxtList, gHopCounter)) < (iPiconMaskTopK - iScrollSpacerK) then
mSetNextHopper(me)
mGetAnuthrChronChunk(me, 0, pDir)
end if
if mGetMyBottLoc(me, getAt(iHopTxtList, 1)) < iDescFldStartK then
mPopToptoBott(me)
end if
else
if mIsBelowTopLimit(me, 1) then
mPopBotttoTop(me)
mSetNextHopper(me)
set Lcstnum to getAt(iHopTxtList, gHopCounter + 1)
set Lwhichprevone to getaProp(iHopItemsList, Lcstnum) - 1
mGetAnuthrChronChunk(me, Lwhichprevone, pDir)
end if
end if
set gCHROisScrolling to 0
end
on mGetAnuthrChronChunk me, pWhich, pDir
hReportStatus("Acquiring additional text...")
if pDir > 0 then
hPlaceEntryRequest(1)
if gHopCounter > 1 then
set the locV of sprite getPropAt(iHopTxtList, gHopCounter) to mGetMyBottLoc(me, getAt(iHopTxtList, gHopCounter - 1)) + iScrollSpacerK
end if
else
set Loffset to (gGlobalStepCount - pWhich) * -1
hPlaceEntryRequest(Loffset)
end if
end
on mWaitForStyling me
set gStylePermitF to 1
repeat while hStyleMe() = 0
end repeat
end
on mSetNextHopper me
if gHopCounter < 4 then
set gHopCounter to gHopCounter + 1
end if
set gdescfield to getAt(iHopTxtList, gHopCounter)
if gHopCounter > 1 then
set the locV of sprite getPropAt(iHopTxtList, gHopCounter) to mGetMyBottLoc(me, getAt(iHopTxtList, gHopCounter - 1)) + iScrollSpacerK
end if
end
on mTextUpdateCheck me
global gYouClickedF
if gYouClickedF then
set gYouClickedF to 0
return
end if
if mIsBelowTopLimit(me, gHopCounter) and (iLastScrollDir < 0) then
return
end if
if mIsPastBottLimit(me, gHopCounter) and (iLastScrollDir > 0) then
mWaitForStyling(me)
mSetNextHopper(me)
if gHopCounter = 1 then
exit
end if
hSysAlert(#null)
hWinVoiceMicOff()
set gCHROisScrolling to 1
set Mycstnum to getAt(iHopTxtList, gHopCounter - 1)
set Lwhichnextone to getaProp(iHopItemsList, Mycstnum) + 1
mGetAnuthrChronChunk(me, Lwhichnextone, 1)
set gCHROisScrolling to 0
return
end if
end
on mClearThisHopper me, x
set Lmyfld to getAt(iHopTxtList, value(x))
hPrepStyles(Lmyfld)
setaProp(iHopItemsList, Lmyfld, 0)
end
on mPopToptoBott me
set Ltemp to [:]
set L1 to getPropAt(iHopTxtList, 1)
set L2 to getAt(iHopTxtList, 1)
deleteAt(iHopTxtList, 1)
addProp(iHopTxtList, L1, L2)
if gHopCounter > 1 then
set gHopCounter to gHopCounter - 1
end if
mClearThisHopper(me, 4)
updateStage()
end
on mPopBotttoTop me
set LP1 to getPropAt(iHopTxtList, 4)
set LV1 to getAt(iHopTxtList, 4)
set LP4 to getPropAt(iHopTxtList, 3)
set LV4 to getAt(iHopTxtList, 3)
set LP3 to getPropAt(iHopTxtList, 2)
set LV3 to getAt(iHopTxtList, 2)
set LP2 to getPropAt(iHopTxtList, 1)
set LV2 to getAt(iHopTxtList, 1)
set iHopTxtList to [:]
addProp(iHopTxtList, LP1, LV1)
addProp(iHopTxtList, LP2, LV2)
addProp(iHopTxtList, LP3, LV3)
addProp(iHopTxtList, LP4, LV4)
set gHopCounter to 0
mClearThisHopper(me, 1)
set iScrollBackFlag to 1
updateStage()
end
on mhopreport me
put "iHopTxtList..." & iHopTxtList
put "#:Fld:Spr:Top:Text"
repeat with i = 1 to 4
set thefld to getAt(iHopTxtList, i)
set thespr to getPropAt(iHopTxtList, i)
put i && " " & thefld && " " & thespr && " " & the top of sprite thespr && " " & char 1 to 4 of field thefld
end repeat
put "iHopCastHghtList..."
repeat with j = 1 to 4
put getPropAt(iHopCastHghtList, j) && getAt(iHopCastHghtList, j)
end repeat
put "iHopItemsList..."
put " Cst#:ChronItem# in queue order:"
repeat with k = 1 to 4
set Mycstnum to getAt(iHopTxtList, k)
put Mycstnum && getaProp(iHopItemsList, Mycstnum)
end repeat
end
on mScrollBarCreditScroll me, pScrollUpDist
set the locV of sprite 3 to 40 - (pScrollUpDist * gScrollIncrK)
end
on mScrollBarChartScroll me, pScrollUpDist
global gChartSpriteList
set x to 40 - (pScrollUpDist * gScrollIncrK)
repeat with i = 1 to count(gChartSpriteList)
set the locV of sprite getAt(gChartSpriteList, i) to x
end repeat
end
on mImportScroll me, pScrollUpDist
set the locV of sprite 4 to 90 - (pScrollUpDist * gScrollIncrK)